package cn.com.cifi.mars.mapper.mars;

import java.util.List;

import cn.com.cifi.mars.bean.vo.price.req.PriceReportReqParam;
import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import cn.com.cifi.mars.entity.DmDmValueReport;

/**
 * <p>
 * 货值分析报表 Mapper 接口
 * </p>
 *
 * @author plx
 * @since 2020-02-19
 */
public interface DmDmValueReportMapper extends BaseMapper<DmDmValueReport> {

    /**
     * 同步计算货值数据，insert into select 会锁表，耗时长的执行会有问题
     * @param endDate 2020-03
     * @param endYear 2020
     * @param endMonth 03
     * @param endTime 2020-04-01 06:00:00
     */
    void insertSync(@Param("endDate")String endDate,@Param("endYear")String endYear,@Param("endMonth")String endMonth,@Param("endTime")String endTime,@Param("status")List<String> status);

    /**
     * 计算首开、续销
     * @param endDate 2020-03
     * @param endTime 2020-04-01 06:00:00
     */
    void updateFirstOpen(@Param("endDate")String endDate,@Param("endTime")String endTime);

    List<DmDmValueReport> selectByEndDate(@Param("endDate")String endDate);

	void removeDmDmValueReportLast();

	void insertDmDmValueReportLast(@Param("endDate")String endDate);

}
